public class SingletonTest {
    public static void main(String[] args) {
        Singleton singleton1 = Singleton.getInstance();
        singleton1.showMessage();
        Singleton singleton2 = Singleton.getInstance();
        if (singleton1 == singleton2) {
            System.out.println("两个实例是同一个，符合单例模式要求。");
        } else {
            System.out.println("两个实例不是同一个，不符合单例模式要求。");
        }
    }
}